﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 出库管理基础输入参数
/// </summary>
public class OutboundmanageBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 出库单号
    /// </summary>
    public virtual string? outboundmanageCode { get; set; }
    
    /// <summary>
    /// 出库类型ID
    /// </summary>
    public virtual long? outboundId { get; set; }
    
    /// <summary>
    /// 仓库名称ID
    /// </summary>
    public virtual long? warehouseId { get; set; }
    
    /// <summary>
    /// 出库日期
    /// </summary>
    public virtual DateTime? OutboundTime { get; set; }
    
    /// <summary>
    /// 关联单号
    /// </summary>
    public virtual long? saleId { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public virtual long? clientId { get; set; }
    
    /// <summary>
    /// 收货人
    /// </summary>
    public virtual string? consignee { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    public virtual string? Contact { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public virtual long? AttnId { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? remark { get; set; }
    
    /// <summary>
    /// 出库明细
    /// </summary>
    public virtual string? outbounddetails { get; set; }
    
    /// <summary>
    /// 出库状态
    /// </summary>
    public virtual int? outboundType { get; set; }
    
    /// <summary>
    /// 出库单价
    /// </summary>
    [Required(ErrorMessage = "出库单价不能为空")]
    public virtual decimal? OutboundPrice { get; set; }
    
    /// <summary>
    /// 出库数量
    /// </summary>
    [Required(ErrorMessage = "出库数量不能为空")]
    public virtual int? OutboundQuantity { get; set; }
    
    /// <summary>
    /// 出库金额
    /// </summary>
    [Required(ErrorMessage = "出库金额不能为空")]
    public virtual decimal? OutboundAmount { get; set; }
    
}

/// <summary>
/// 出库管理分页查询输入参数
/// </summary>
public class PageOutboundmanageInput : BasePageInput
{
    /// <summary>
    /// 出库单号
    /// </summary>
    public string? outboundmanageCode { get; set; }
    
    /// <summary>
    /// 出库类型ID
    /// </summary>
    public long? outboundId { get; set; }
    
    /// <summary>
    /// 仓库名称ID
    /// </summary>
    public long? warehouseId { get; set; }
    
    /// <summary>
    /// 出库日期范围
    /// </summary>
     public DateTime?[] OutboundTimeRange { get; set; }
    
    /// <summary>
    /// 关联单号
    /// </summary>
    public long? saleId { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public long? clientId { get; set; }
    
    /// <summary>
    /// 收货人
    /// </summary>
    public string? consignee { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    public string? Contact { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public long? AttnId { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? remark { get; set; }
    
    /// <summary>
    /// 出库明细
    /// </summary>
    public string? outbounddetails { get; set; }
    
    /// <summary>
    /// 出库状态
    /// </summary>
    public int? outboundType { get; set; }
    
    /// <summary>
    /// 出库单价
    /// </summary>
    public decimal? OutboundPrice { get; set; }
    
    /// <summary>
    /// 出库数量
    /// </summary>
    public int? OutboundQuantity { get; set; }
    
    /// <summary>
    /// 出库金额
    /// </summary>
    public decimal? OutboundAmount { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 出库管理增加输入参数
/// </summary>
public class AddOutboundmanageInput
{
    /// <summary>
    /// 出库单号
    /// </summary>
    [MaxLength(32, ErrorMessage = "出库单号字符长度不能超过32")]
    public string? outboundmanageCode { get; set; }
    
    /// <summary>
    /// 出库类型ID
    /// </summary>
    public long? outboundId { get; set; }
    
    /// <summary>
    /// 仓库名称ID
    /// </summary>
    public long? warehouseId { get; set; }
    
    /// <summary>
    /// 出库日期
    /// </summary>
    public DateTime? OutboundTime { get; set; }
    
    /// <summary>
    /// 关联单号
    /// </summary>
    public long? saleId { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public long? clientId { get; set; }
    
    /// <summary>
    /// 收货人
    /// </summary>
    [MaxLength(32, ErrorMessage = "收货人字符长度不能超过32")]
    public string? consignee { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系人字符长度不能超过32")]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public long? AttnId { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200, ErrorMessage = "备注字符长度不能超过200")]
    public string? remark { get; set; }
    
    /// <summary>
    /// 出库明细
    /// </summary>
    [MaxLength(32, ErrorMessage = "出库明细字符长度不能超过32")]
    public string? outbounddetails { get; set; }
    
    /// <summary>
    /// 出库状态
    /// </summary>
    public int? outboundType { get; set; }
    
    /// <summary>
    /// 出库单价
    /// </summary>
    [Required(ErrorMessage = "出库单价不能为空")]
    public decimal? OutboundPrice { get; set; }
    
    /// <summary>
    /// 出库数量
    /// </summary>
    [Required(ErrorMessage = "出库数量不能为空")]
    public int? OutboundQuantity { get; set; }
    
    /// <summary>
    /// 出库金额
    /// </summary>
    [Required(ErrorMessage = "出库金额不能为空")]
    public decimal? OutboundAmount { get; set; }
    
}

/// <summary>
/// 出库管理删除输入参数
/// </summary>
public class DeleteOutboundmanageInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 出库管理更新输入参数
/// </summary>
public class UpdateOutboundmanageInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 出库单号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "出库单号字符长度不能超过32")]
    public string? outboundmanageCode { get; set; }
    
    /// <summary>
    /// 出库类型ID
    /// </summary>    
    public long? outboundId { get; set; }
    
    /// <summary>
    /// 仓库名称ID
    /// </summary>    
    public long? warehouseId { get; set; }
    
    /// <summary>
    /// 出库日期
    /// </summary>    
    public DateTime? OutboundTime { get; set; }
    
    /// <summary>
    /// 关联单号
    /// </summary>    
    public long? saleId { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>    
    public long? clientId { get; set; }
    
    /// <summary>
    /// 收货人
    /// </summary>    
    [MaxLength(32, ErrorMessage = "收货人字符长度不能超过32")]
    public string? consignee { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系人字符长度不能超过32")]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>    
    public long? AttnId { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(200, ErrorMessage = "备注字符长度不能超过200")]
    public string? remark { get; set; }
    
    /// <summary>
    /// 出库明细
    /// </summary>    
    [MaxLength(32, ErrorMessage = "出库明细字符长度不能超过32")]
    public string? outbounddetails { get; set; }
    
    /// <summary>
    /// 出库状态
    /// </summary>    
    public int? outboundType { get; set; }
    
    /// <summary>
    /// 出库单价
    /// </summary>    
    [Required(ErrorMessage = "出库单价不能为空")]
    public decimal? OutboundPrice { get; set; }
    
    /// <summary>
    /// 出库数量
    /// </summary>    
    [Required(ErrorMessage = "出库数量不能为空")]
    public int? OutboundQuantity { get; set; }
    
    /// <summary>
    /// 出库金额
    /// </summary>    
    [Required(ErrorMessage = "出库金额不能为空")]
    public decimal? OutboundAmount { get; set; }
    
}

/// <summary>
/// 出库管理主键查询输入参数
/// </summary>
public class QueryByIdOutboundmanageInput : DeleteOutboundmanageInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataOutboundmanageInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 出库管理数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportOutboundmanageInput : BaseImportInput
{
    /// <summary>
    /// 出库单号
    /// </summary>
    [ImporterHeader(Name = "出库单号")]
    [ExporterHeader("出库单号", Format = "", Width = 25, IsBold = true)]
    public string? outboundmanageCode { get; set; }
    
    /// <summary>
    /// 出库类型ID 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? outboundId { get; set; }
    
    /// <summary>
    /// 出库类型ID 文本
    /// </summary>
    [ImporterHeader(Name = "出库类型ID")]
    [ExporterHeader("出库类型ID", Format = "", Width = 25, IsBold = true)]
    public string outboundFkDisplayName { get; set; }
    
    /// <summary>
    /// 仓库名称ID 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? warehouseId { get; set; }
    
    /// <summary>
    /// 仓库名称ID 文本
    /// </summary>
    [ImporterHeader(Name = "仓库名称ID")]
    [ExporterHeader("仓库名称ID", Format = "", Width = 25, IsBold = true)]
    public string warehouseFkDisplayName { get; set; }
    
    /// <summary>
    /// 出库日期
    /// </summary>
    [ImporterHeader(Name = "出库日期")]
    [ExporterHeader("出库日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? OutboundTime { get; set; }
    
    /// <summary>
    /// 关联单号 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? saleId { get; set; }
    
    /// <summary>
    /// 关联单号 文本
    /// </summary>
    [ImporterHeader(Name = "关联单号")]
    [ExporterHeader("关联单号", Format = "", Width = 25, IsBold = true)]
    public string saleFkDisplayName { get; set; }
    
    /// <summary>
    /// 客户名称 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? clientId { get; set; }
    
    /// <summary>
    /// 客户名称 文本
    /// </summary>
    [ImporterHeader(Name = "客户名称")]
    [ExporterHeader("客户名称", Format = "", Width = 25, IsBold = true)]
    public string clientFkDisplayName { get; set; }
    
    /// <summary>
    /// 收货人
    /// </summary>
    [ImporterHeader(Name = "收货人")]
    [ExporterHeader("收货人", Format = "", Width = 25, IsBold = true)]
    public string? consignee { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    [ImporterHeader(Name = "联系人")]
    [ExporterHeader("联系人", Format = "", Width = 25, IsBold = true)]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 经办人 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? AttnId { get; set; }
    
    /// <summary>
    /// 经办人 文本
    /// </summary>
    [ImporterHeader(Name = "经办人")]
    [ExporterHeader("经办人", Format = "", Width = 25, IsBold = true)]
    public string AttnFkDisplayName { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? remark { get; set; }
    
    /// <summary>
    /// 出库明细
    /// </summary>
    [ImporterHeader(Name = "出库明细")]
    [ExporterHeader("出库明细", Format = "", Width = 25, IsBold = true)]
    public string? outbounddetails { get; set; }
    
    /// <summary>
    /// 出库状态
    /// </summary>
    [ImporterHeader(Name = "出库状态")]
    [ExporterHeader("出库状态", Format = "", Width = 25, IsBold = true)]
    public int? outboundType { get; set; }
    
    /// <summary>
    /// 出库单价
    /// </summary>
    [ImporterHeader(Name = "*出库单价")]
    [ExporterHeader("*出库单价", Format = "", Width = 25, IsBold = true)]
    public decimal? OutboundPrice { get; set; }
    
    /// <summary>
    /// 出库数量
    /// </summary>
    [ImporterHeader(Name = "*出库数量")]
    [ExporterHeader("*出库数量", Format = "", Width = 25, IsBold = true)]
    public int? OutboundQuantity { get; set; }
    
    /// <summary>
    /// 出库金额
    /// </summary>
    [ImporterHeader(Name = "*出库金额")]
    [ExporterHeader("*出库金额", Format = "", Width = 25, IsBold = true)]
    public decimal? OutboundAmount { get; set; }
    
}
